<div class="content">
	<?php if(1)://if($cate_id): ?>
    	<div class="xuanze Box">
    	<ul>
    		<?php if($son_cates):?>
        	<li class="wyyc">
        		<span>类型：</span>
                <em><?php $lk = sParam('scate',$sparams);
                		  echo $this->Html->link('全部',$lk['a'],$lk['p']);
                	?>
                </em>
                <p><?php foreach ($son_cates as $sk => $sc):$lk = sParam('scate',$sparams,$sk);
                			echo $this->Html->link($sc,$lk['a']+array('cate'=>11),$lk['p']);endforeach;?>
                </p>
            </li>
            <?php endif;?>
            <?php //var_dump($sparams)?>
            <?php if($sparams[0]!='cate12' && $sparams[0]!='cate13' && $sparams[0]!='cate14' ):?>
            <li>
            	<span>场馆：</span>
                <em><?php 
                		$lk = sParam('venue',$sparams);
                		echo $this->Html->link('全部',$lk['a'],$lk['p']);
                	?>
                </em>
                <p style = 'height:38px;position:relative;'><?php foreach ($venues as $vk => $venue):?>
                		<?php 
                			$lk = sParam('venue',$sparams,$vk);
                			echo $this->Html->link($venue,$lk['a'],$lk['p']);
                		?>
                	<?php endforeach;?>
                	<a id = 'more_venue_toggle_bar' href = 'javascript:;'>更多</a>
                </p>
            </li>
            <?php endif;?>
            <li>
            	<span>时间：</span>
                <em><?php 
                		$lk = sParam('show',$sparams);
                		echo $this->Html->link('全部',$lk['a'],$lk['p']);?>
                </em>
                <p>
                	<?php $lk = sParam('show',$sparams,1);?>
                	<?php echo $this->Html->link('今天',$lk['a'],$lk['p']);?>
                	<?php $lk = sParam('show',$sparams,2);?>
                	<?php echo $this->Html->link('明天',$lk['a'],$lk['p']);?>
                	<?php $lk = sParam('show',$sparams,3);?>
                	<?php echo $this->Html->link('一周内',$lk['a'],$lk['p']);?>
                	<?php $lk = sParam('show',$sparams,4);?>
                	<?php echo $this->Html->link('一个月内',$lk['a'],$lk['p']);?>
                </p>
            </li>
            <li>
            	<span>费用：</span>
                <em><?php 
                	$lk = sParam('price',$sparams);
                		echo $this->Html->link('全部',$lk['a'],$lk['p']);
                	?>
                </em>
                <p><?php $lk = sParam('price',$sparams,1);?>
                	<?php echo $this->Html->link('100元以下',$lk['a'],$lk['p']);?>
                	<?php $lk = sParam('price',$sparams,2);?>
                	<?php echo $this->Html->link('101-300元',$lk['a'],$lk['p']);?>
                	<?php $lk = sParam('price',$sparams,3);?>
                	<?php echo $this->Html->link('301-500元',$lk['a'],$lk['p']);?>
                	<?php $lk = sParam('price',$sparams,4);?>
                	<?php echo $this->Html->link('500元以上',$lk['a'],$lk['p']);?>
                </p>
            </li>
            <div class="clear"></div>	
        </ul>
		</div>
    	<div class="clear"></div>
	<?php endif; ?>    	
	
	<div class="conLeft floatl Box">
        	<div class="boxTitle">
            	<p>您已选择的搜索条件：所有商品  </p>
            	<?php if(false):?>
                <ul>
                	<li class="paixu">排序方式：</li>
                    <li>
                    	<?php $lk = sParam('sort',$sparams);?>
                    	<?php echo $this->Html->link('默认',$lk['a'],$lk['p']);?>
                    </li>
                    <li>
                    	<?php $lk = sParam('sort',$sparams,'new');?>
                    	<?php echo $this->Html->link('最近更新',$lk['a'],$lk['p']);?>
                    </li>
                    <li>
                    	<?php $lk = sParam('sort',$sparams,'ing');?>
                    	<?php echo $this->Html->link('最近演出时间',$lk['a'],$lk['p']);?>
                    </li>
                </ul>
                <?php endif;?>
            </div>
            <div class="clear"></div>
            <ul class="ppin">
            <?php foreach ($tickets as $ticket):?>
            	<li>
                	<dl>
                    	<dt>
		            		<?php 
								if(isset($ticket['ListPhoto']['file_path']))
									$pic = $ticket['ListPhoto']['file_path'];
								else 
									$pic = 'default/himg_19.jpg';
							?>
                    		<?php $image = $this->Html->image($pic,array(
									'alt'=>$ticket['Ticket']['title'],
									'title'=>$ticket['Ticket']['title']
								  ));
							?>
							<?php echo $this->Html->link($image,
											TicketView($ticket),
											array('escape'=>false,'target'=>'_blank')
									  )
								?>
                    	</dt>
                        <dd>
                        	<h4>
                        		<?php
								 $title = $ticket['Ticket']['title'];
								 if(isset($rsword)){
					
									usort($rsword, "lenlen");

									foreach ($rsword as $ksword){
									 	$title =  $this->Text->highlight(
												$title,
												$ksword,
												array('format' => '<font color="red">\1</font>')
										);
									}
								 }
								 
                        		 echo $this->Html->link($title,
											TicketView($ticket),
											array("class"=>"mcheng",'title'=>$ticket['Ticket']['title'],'escape'=>false,'target'=>'_blank')
									  );
								 if($ticket['Ticket']['ticket_corner'] == 1){
								 	echo '　<font color=red>(预售中)</font>';
								 }elseif($ticket['Ticket']['ticket_corner'] == 2){
								 	echo '　<font color=red>(热卖中)</font>';
								 }
								?>
                        	</h4>
                            <p>
                            	<span>时间：<?php echo $ticket['Ticket']['showtime'];
				                            	if($ticket['Ticket']['endtime'] != '')
				                            		echo ' 至 '.$ticket['Ticket']['endtime'];?>
                            	</span>   
                            	<span>场馆：<?php 
                            				$vtitle = $ticket['Venue']['title_cn'];
			                            	if(isset($rsword)){
			                            			
			                            		usort($rsword, "lenlen");
			                            	
			                            		foreach ($rsword as $ksword){
			                            			$vtitle =  $this->Text->highlight(
			                            					$vtitle,
			                            					$ksword,
			                            					array('format' => '<font color="red">\1</font>')
			                            			);
			                            		}
			                            	}
                            				
                            				echo $this->Html->link($vtitle,
								            		citylink('Venues','view')+array($ticket['Venue']['id']),
								            		array('title'=>$ticket['Venue']['title_cn'],'escape'=>false,'target'=>'_blank'));
								            ?>
								</span>
								<?php if($ticket['Ticket']['spt_eticket']){ ?>
									<span>
										<em>电子票</em>
									</span>                           	
                            	<?php }?>
							</p>
                            <p>
                            	<?php 
                            		$price = array();
                            		foreach ($ticket['TicketPrice'] as $tp){
                            			$price[$tp['price']] = $tp['price'];
                            		}
                            		ksort($price);
                            	?>
                            	票价： <?php echo join(',',$price) ?>
                            </p>
                            <p>简介：<?php 
		                            echo cleanText($ticket['Ticket']['content'],130);
                            	 ?>
                            </p>
                            <?php echo $this->Html->link('立即购票',
											TicketView($ticket),
											array("class"=>"goumai",'title'=>$ticket['Ticket']['title'],'target'=>'_blank')
									  )
								?>
                        </dd>
                    </dl>
                </li>
           <?php endforeach;?>
                 
                <div class="clear"></div>
		</ul>
        <div class="fanye">
        <?php 
        	$pagr = sParam(false,$sparams);
            $this->Paginator->options(array('url' => citylink('Tickets')+$pagr['a']));
            echo $this->Paginator->prev(__('上一页'), array(),null,array('class' => 'prev disabled'));
            echo $this->Paginator->numbers(array('first' => 2, 'last' => 2,'separator'=>' ','tag'=>'span')); 
            echo $this->Paginator->next(__('下一页'), array(),null,array('class' => 'next disabled'));
            echo $this->Paginator->counter(' 共{:pages}页');
        ?>
        </div>
	</div>
        
	<div class="conRight floatr">
		   <?php echo $this->element('index/ticketCate')?>
           <?php echo $this->element('block/blog')?>
           <?php echo $this->element('block/recentTicket')?>
           <?php echo $this->element('block/newArticle')?>
           <?php echo $this->element('block/hotArticle')?>
	</div>
</div>	
<script>
$(function(){
	$('#more_venue_toggle_bar').toggle(function(){
		var $tar = $(this).parent();
		$tar.animate({height:$tar.get(0).scrollHeight},500)
		$(this).html('收起');
	},function(){
		$(this).parent().animate({height:'38px'},500)
			.end().html('更多');
	})
})
</script>